package com.lktx.sso.admin.entity;

import com.lktx.sso.system.entity.Menu;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/** sso组织管理 - sso_organization */
@Data
@Table("sso_organization")
public class SsoOrganization {
    /**组织ID*/
    @Id(value = "sso_organization_id", keyType = KeyType.Auto)
    private Integer ssoOrganizationId;
    /**组织名字*/
    private String name;
    /**组织备注*/
    private String remark;
    /**组织父ID*/
    private Integer ssoOrganizationPid;
    /**创建时间*/
    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;
    /**更新时间*/
    @Column(onUpdateValue = "now()", onInsertValue = "now()")
    private LocalDateTime updateTime;
    /**删除标识*/
    @Column(isLogicDelete = true)
    private Integer deleted;

    /**
     * 子节点
     */
    @Column(ignore = true)
    private List<SsoOrganization> children;
}